It is known that humans are adaptable enough to properly perceive the original color of an object even when the light source environment changes. In contrast, with digital cameras, a color cast phenomenon occurs in which captured images become bluish or reddish depending on the light sources (i.e., the difference in “color temperature”).
Color balance correction (or white balance correction) has been performed as a technology for correcting images in which such a color cast phenomenon occurs (for example, see Japanese Laid-open Patent Publication No. 2002-152772). For example, images are corrected, using color balance correction, by obtaining gray candidate pixels in the image and making these pixels closer to prescribed gray points located on a daylight locus.
However, with the technology for performing the color balance correction described above, because bright and dark pixels are extracted as grey candidate pixels without distinguishing whether the extracted pixel is actually a bright or a dark pixel, it is difficult to tell whether the captured color has a “color cast” due to the difference in color temperatures of light sources or the captured color is the actual original color of the object. Accordingly, in some cases, a color cast may not be appropriately corrected due to erroneous correction.